<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./lib/echarts.min.js"></script>
  </head>
  <body>
    <div id="main" style="width: 600px; height: 400px"></div>
    <script>
      var myChart = echarts.init(document.getElementById("main"));
      option = {
        title: {
          text: "2021全学科薪资走势",
        },
        xAxis: {
          type: "category",
          data: ["1月", "2月", "3月", "4月", "5月", "6月", "7月"],
          axisLine: {
            lineStyle: {
              type: "dashed",
              color: "#999",
            },
          },
        },
        yAxis: {
          type: "value",
          splitLine: {
            lineStyle: {
              type: "dashed",
            },
          },
        },
        tooltip: {
          trigger: "item",
        },
        series: [
          {
            areaStyle: {
              color: {
                type: "linear",
                x: 0,
                y: 0,
                x2: 0,
                y2: 1,
                colorStops: [
                  {
                    offset: 0,
                    color: "#6bc0ff", // 0% 处的颜色
                  },
                  {
                    offset: 0.5,
                    color: "#fff", // 100% 处的颜色
                  },
                ],
                global: false, // 缺省为 false
              },
            },
            lineStyle: {
              width: 6,
            },
            data: [13000, 24000, 18800, 16000, 19000, 13000, 13200],
            type: "line",
            smooth: true,
            symbolSize: 10,
          },
        ],
        grid: {
          left: "15%",
          top: "15%",
          right: "15%",
          bottom: "15%",
        },
        color: ["#62afff"],
      };

      myChart.setOption(option);
    </script>
  </body>
</html>
